// 路由管理

import { request } from '@/utils/service'
import { baseApiUrl } from '@/api/baseApiUrl'

interface IgetRouterList {
  pageIndex: number
  pageSize: number
}
// 获取路由列表
export function getRouterList() {
  return request({
    url: baseApiUrl.ROUTER_LIST,
    method: 'get'
  })
}

// 添加路由
export function addRouter(data: any) {
  return request({
    url: baseApiUrl.ROUTER_ADD,
    method: 'post',
    data
  })
}

// 编辑路由
export function editRouter(data: any) {
  return request({
    url: baseApiUrl.ROUTER_EDIT,
    method: 'post',
    data
  })
}

// 删除路由
export function deleteRouter(id: number) {
  return request({
    url: baseApiUrl.ROUTER_DELETE + `?id=${id}`,
    method: 'get'
  })
}
